package com.snailhd.common.enums;

import com.snailhd.common.entity.SubMsgResult;

public enum RespSubCodeEnum {

    PALCE_LOGIN("-1","请登录"),
    ACCOUNT_NOT_EXIST("1000","账号不存在"),
    GET_DATABASE_NAME_ERROR("3000","获取数据库名称失败");


    private String subCode;
    private String subMsg;

    RespSubCodeEnum(String subCode, String subMsg) {
        this.subCode = subCode;
        this.subMsg = subMsg;
    }

    public String getSubCode() {
        return subCode;
    }

    public String getSubMsg() {
        return subMsg;
    }

    public SubMsgResult generalSubMsg(){
        SubMsgResult res = new SubMsgResult();
        res.setSubCode(subCode);
        res.setSubMsg(subMsg);
        return res;
    }
}
